// components/book-card/book-card.js
Component({
  properties: {
    book: Object
  },

  methods: {
    onCardTap() {
      this.triggerEvent('open-detail', this.data.book);
    },

    onDetailTap() {
      this.triggerEvent('open-detail', this.data.book);
    },

    onClaimTap(e) {
      e.stopPropagation();
      this.triggerEvent('claim-book', this.data.book.id);
    }
  }
})